import React, { useContext } from "react";
import { MobXProviderContext, Observer } from 'mobx-react';

function RenderItem() {

  const { storeOne } = useContext(MobXProviderContext)

  return (
    <Observer>{() => (
      <div>
        <h1>{storeOne.testValue}</h1>
          <h1>{storeOne.testValue2}</h1>
          <button onClick={() => { 
            storeOne.finsh('dddd')
            storeOne.change2('22222')
          }}>改变</button>
      </div>)}
    </Observer>
  )
}

export default RenderItem;
